﻿@model ThaireInvestmentWeb.Models.EditEquityHeaderModel
@{
    ViewBag.Title = "Equity Price History";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<table class="navi" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td style="width: 100%;">
            <div class="navi">
                Instrument Type > <a href="@Url.Action("ManageEquity", "Equity", new { headerId = @Model.HeaderID })">Equity Securities</a> > <a href="@Url.Action("EditEquityHeader", "Equity", new { headerId = Model.Header.EquityHeaderID })">Header</a> > History
          
            </div>
        </td>
    </tr>
</table>

<table class="tableheader" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td height="38" align="center" style="width: 100%; text-align: center;">View Equity Price History</td>
    </tr>
</table>

<table width="951" border="0" align="center">
    <tr>
        <td>
            @using (Html.BeginForm("EditEquityHeader", "Equity", FormMethod.Post, new { id = "mainForm" }))
            {
                @Html.ValidationSummary(true)

   

                <div style="width: 930px; overflow: auto;">
                    @if (Model.PriceAdapter != null)
                    {
                        var grid = new WebGrid(source: Model.PriceAdapter);
                        @grid.GetHtml(tableStyle: "tablelist", headerStyle: "headertable", displayHeader: @Model.PriceAdapter.Count > 0,
            columns: grid.Columns(
            grid.Column(columnName: "No", header: "NO.", canSort: false),
                grid.Column(columnName: "Type", header: "Type", canSort: false),
                grid.Column(columnName: "PriceDate", header: "Date", canSort: false, format: (item) => ThaireInvestmentWeb.Util.WebUtil.FormatDate(item.PriceDate)),
                grid.Column(columnName: "Price", header: "Price Per Unit", canSort: false, style: "columndecimal")

)
                );
                    }
                </div>


            }
            <br>
        </td>
    </tr>
</table>



